package com.sure.minion.services.demo.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sure.minion.services.base.handler.exception.BizAutoHandledException;
import com.sure.minion.services.demo.api.IDemoService;
import com.sure.minion.services.demo.dao.DemoDAO;

/**
 * @Description DemoService
 * @author syuan
 * @date 2015年8月28日  下午1:50:30
 * Company: TravelSky
 */
@Service
public class DemoService implements IDemoService {
	@Autowired
	private DemoDAO demoDAO;

	@Transactional
	public boolean login(String username, String password) {
		// TODO 使用genericDAO操作数据库
		// genericDAO.findById()
		// ...

		throw new BizAutoHandledException("EC_INVALID_USER");
	}

	@Transactional
	public boolean logout() {
		return true;
	}
}
